{
  "author": "@4ian",
  "category": "Visual effect",
  "description": "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.\nAfter adding this to an object, you have to **trigger the effect** by using the **Flash action**.",
  "extensionNamespace": "",
  "fullName": "Flash (blink)",
  "helpPath": "",
  "iconUrl": "",
  "name": "Flash",
  "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/flash-outline.svg",
  "shortDescription": "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.\nTrigger the effect by using the Flash action.",
  "version": "1.0.0",
  "origin": {
    "identifier": "Flash",
    "name": "gdevelop-extension-store"
  },
  "tags": [
    "flash",
    "blink",
    "visible",
    "invisible",
    "hit",
    "damage"
  ],
  "authorIds": [
    "wWP8BSlAW0UP4NeaHa2LcmmDzmH2"
  ],
  "dependencies": [],
  "eventsFunctions": [],
  "eventsBasedBehaviors": [
    {
      "description": "Make the object flash (blink) for a period of time, so that it is alternately visible and invisible.\nTrigger the effect by using the Flash action.",
      "fullName": "Flash (blink)",
      "name": "Flash",
      "objectType": "",
      "eventsFunctions": [
        {
          "description": "",
          "fullName": "",
          "functionType": "Action",
          "group": "",
          "name": "doStepPreEvents",
          "private": false,
          "sentence": "",
          "events": [
            {
              "type": "BuiltinCommonInstructions::Standard",
              "conditions": [
                {
                  "type": {
                    "value": "Flash::Flash::PropertyIsFlashing"
                  },
                  "parameters": [
                    "Object",
                    "Behavior"
                  ]
                }
              ],
              "actions": [],
              "events": [
                {
                  "type": "BuiltinCommonInstructions::Standard",
                  "conditions": [
                    {
                      "type": {
                        "value": "ObjectTimer"
                      },
                      "parameters": [
                        "Object",
                        "\"FlashTimer\"",
                        "Object.Behavior::PropertyHalfPeriodTime()"
                      ]
                    },
                    {
                      "type": {
                        "value": "Visible"
                      },
                      "parameters": [
                        "Object"
                      ]
                    }
                  ],
                  "actions": [
                    {
                      "type": {
                        "value": "Cache"
                      },
                      "parameters": [
                        "Object"
                      ]
                    },
                    {
                      "type": {
                        "value": "ResetObjectTimer"
                      },
                      "parameters": [
                        "Object",
                        "\"FlashTimer\""
                      ]
                    }
                  ]
                },
                {
                  "type": "BuiltinCommonInstructions::Standard",
                  "conditions": [
                    {
                      "type": {
                        "value": "ObjectTimer"
                      },
                      "parameters": [
                        "Object",
                        "\"FlashTimer\"",
                        "Object.Behavior::PropertyHalfPeriodTime()"
                      ]
                    },
                    {
                      "type": {
                        "inverted": true,
                        "value": "Visible"
                      },
                      "parameters": [
                        "Object"
                      ]
                    }
                  ],
                  "actions": [
                    {
                      "type": {
                        "value": "Montre"
                      },
                      "parameters": [
                        "Object",
                        ""
                      ]
                    },
                    {
                      "type": {
                        "value": "ResetObjectTimer"
                      },
                      "parameters": [
                        "Object",
                        "\"FlashTimer\""
                      ]
                    }
                  ]
                },
                {
                  "type": "BuiltinCommonInstructions::Standard",
                  "conditions": [
                    {
                      "type": {
                        "value": "ObjectTimer"
                      },
                      "parameters": [
                        "Object",
                        "\"FlashDurationTimer\"",
                        "Object.Behavior::PropertyFlashDuration()"
                      ]
                    }
                  ],
                  "actions": [
                    {
                      "type": {
                        "value": "Flash::Flash::Stop"
                      },
                      "parameters": [
                        "Object",
                        "Behavior",
                        ""
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "parameters": [
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Object",
              "longDescription": "",
              "name": "Object",
              "optional": false,
              "supplementaryInformation": "",
              "type": "object"
            },
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Behavior",
              "longDescription": "",
              "name": "Behavior",
              "optional": false,
              "supplementaryInformation": "Flash::Flash",
              "type": "behavior"
            }
          ],
          "objectGroups": []
        },
        {
          "description": "Make the specified object(s) blink for the given duration.",
          "fullName": "Flash (blink)",
          "functionType": "Action",
          "group": "",
          "name": "Flash",
          "private": false,
          "sentence": "Make _PARAM0_ blink for _PARAM2_ seconds",
          "events": [
            {
              "type": "BuiltinCommonInstructions::Standard",
              "conditions": [
                {
                  "type": {
                    "value": "Egal"
                  },
                  "parameters": [
                    "GetArgumentAsNumber(\"FlashDuration\")",
                    ">",
                    "0"
                  ]
                }
              ],
              "actions": [
                {
                  "type": {
                    "value": "ResetObjectTimer"
                  },
                  "parameters": [
                    "Object",
                    "\"FlashDurationTimer\""
                  ]
                },
                {
                  "type": {
                    "value": "Flash::Flash::SetPropertyFlashDuration"
                  },
                  "parameters": [
                    "Object",
                    "Behavior",
                    "=",
                    "GetArgumentAsNumber(\"FlashDuration\")"
                  ]
                },
                {
                  "type": {
                    "value": "Flash::Flash::SetPropertyIsFlashing"
                  },
                  "parameters": [
                    "Object",
                    "Behavior",
                    "yes"
                  ]
                }
              ]
            }
          ],
          "parameters": [
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Object",
              "longDescription": "",
              "name": "Object",
              "optional": false,
              "supplementaryInformation": "",
              "type": "object"
            },
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Behavior",
              "longDescription": "",
              "name": "Behavior",
              "optional": false,
              "supplementaryInformation": "Flash::Flash",
              "type": "behavior"
            },
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Duration of the blinking, in seconds",
              "longDescription": "",
              "name": "FlashDuration",
              "optional": false,
              "supplementaryInformation": "",
              "type": "expression"
            }
          ],
          "objectGroups": []
        },
        {
          "description": "Check if the specified objects are flashing.",
          "fullName": "Is object flashing",
          "functionType": "Condition",
          "group": "",
          "name": "IsFlashing",
          "private": false,
          "sentence": "_PARAM0_ is flashing",
          "events": [
            {
              "type": "BuiltinCommonInstructions::Standard",
              "conditions": [],
              "actions": [
                {
                  "type": {
                    "value": "SetReturnBoolean"
                  },
                  "parameters": [
                    "False"
                  ]
                }
              ]
            },
            {
              "type": "BuiltinCommonInstructions::Standard",
              "conditions": [
                {
                  "type": {
                    "value": "Flash::Flash::PropertyIsFlashing"
                  },
                  "parameters": [
                    "Object",
                    "Behavior"
                  ]
                }
              ],
              "actions": [
                {
                  "type": {
                    "value": "SetReturnBoolean"
                  },
                  "parameters": [
                    "True"
                  ]
                }
              ]
            }
          ],
          "parameters": [
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Object",
              "longDescription": "",
              "name": "Object",
              "optional": false,
              "supplementaryInformation": "",
              "type": "object"
            },
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Behavior",
              "longDescription": "",
              "name": "Behavior",
              "optional": false,
              "supplementaryInformation": "Flash::Flash",
              "type": "behavior"
            }
          ],
          "objectGroups": []
        },
        {
          "description": "",
          "fullName": "",
          "functionType": "Action",
          "group": "",
          "name": "onOwnerRemovedFromScene",
          "private": false,
          "sentence": "",
          "events": [
            {
              "type": "BuiltinCommonInstructions::Standard",
              "conditions": [],
              "actions": [
                {
                  "type": {
                    "value": "Flash::Flash::Stop"
                  },
                  "parameters": [
                    "Object",
                    "Behavior",
                    ""
                  ]
                }
              ]
            }
          ],
          "parameters": [
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Object",
              "longDescription": "",
              "name": "Object",
              "optional": false,
              "supplementaryInformation": "",
              "type": "object"
            },
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Behavior",
              "longDescription": "",
              "name": "Behavior",
              "optional": false,
              "supplementaryInformation": "Flash::Flash",
              "type": "behavior"
            }
          ],
          "objectGroups": []
        },
        {
          "description": "",
          "fullName": "",
          "functionType": "Action",
          "group": "",
          "name": "onDeActivate",
          "private": false,
          "sentence": "",
          "events": [
            {
              "type": "BuiltinCommonInstructions::Standard",
              "conditions": [],
              "actions": [
                {
                  "type": {
                    "value": "Flash::Flash::Stop"
                  },
                  "parameters": [
                    "Object",
                    "Behavior",
                    ""
                  ]
                }
              ]
            }
          ],
          "parameters": [
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Object",
              "longDescription": "",
              "name": "Object",
              "optional": false,
              "supplementaryInformation": "",
              "type": "object"
            },
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Behavior",
              "longDescription": "",
              "name": "Behavior",
              "optional": false,
              "supplementaryInformation": "Flash::Flash",
              "type": "behavior"
            }
          ],
          "objectGroups": []
        },
        {
          "description": "Stop the flashing of the specified object.",
          "fullName": "Stop flashing",
          "functionType": "Action",
          "group": "",
          "name": "Stop",
          "private": false,
          "sentence": "Stop flashing _PARAM0_",
          "events": [
            {
              "type": "BuiltinCommonInstructions::Standard",
              "conditions": [
                {
                  "type": {
                    "value": "Flash::Flash::PropertyIsFlashing"
                  },
                  "parameters": [
                    "Object",
                    "Behavior"
                  ]
                }
              ],
              "actions": [
                {
                  "type": {
                    "value": "Montre"
                  },
                  "parameters": [
                    "Object",
                    ""
                  ]
                },
                {
                  "type": {
                    "value": "Flash::Flash::SetPropertyIsFlashing"
                  },
                  "parameters": [
                    "Object",
                    "Behavior",
                    "no"
                  ]
                }
              ]
            }
          ],
          "parameters": [
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Object",
              "longDescription": "",
              "name": "Object",
              "optional": false,
              "supplementaryInformation": "",
              "type": "object"
            },
            {
              "codeOnly": false,
              "defaultValue": "",
              "description": "Behavior",
              "longDescription": "",
              "name": "Behavior",
              "optional": false,
              "supplementaryInformation": "Flash::Flash",
              "type": "behavior"
            }
          ],
          "objectGroups": []
        }
      ],
      "propertyDescriptors": [
        {
          "value": "0.1",
          "type": "Number",
          "label": "Half period (time during which object is invisible), in seconds",
          "description": "",
          "group": "",
          "extraInformation": [],
          "hidden": false,
          "name": "HalfPeriodTime"
        },
        {
          "value": "",
          "type": "Boolean",
          "label": "",
          "description": "",
          "group": "",
          "extraInformation": [],
          "hidden": true,
          "name": "IsFlashing"
        },
        {
          "value": "0",
          "type": "Number",
          "label": "",
          "description": "",
          "group": "",
          "extraInformation": [],
          "hidden": true,
          "name": "FlashDuration"
        }
      ]
    }
  ],
  "eventsBasedObjects": []
}